// 引入 request 文件
import request from '../../untils/request.js'
 
// 微信小程序获取手机号
export const getWXphone = (params) =>{
	return request({
		url: '/openApi/weChat/weChatPhoneNumber',
		method: 'post',
		data: params,
	})
}

export const getMyQrCodeAppList = (params) =>{
	return request({
		url: '/openApi/qrCode/getMyQrCodeAppList',
		method: 'get',
		data: params,
	})
}
export const weChatQrCode = (params) =>{
	return request({
		url: '/openApi/weChat/weChatQrCode',
		method: 'get',
		data: params,
	})
}
// export const getWXphone = (params) =>{
// 	return request({
// 		url: '/openApi/weChat/weChatPhoneNumber',
// 		method: 'post',
// 		data: params,
// 	})
// }

// 保存报名信息
export const signUpSave = (params) =>{
	return request({
		url: '/openApi/signUp/save',
		method: 'post',
		data: params,
	})
}

// 保存报名信息
export const applyMaterialApi = (params) =>{
	return request({
		url: '/openApi/material/apply',
		method: 'post',
		data: params,
	})
}
// 保存报名信息
export const returnMaterialApi = (params) =>{
	return request({
		url: '/openApi/material/giveBack',
		method: 'post',
		data: params,
	})
}

// 保存登记信息
export const saveRegister = (params) =>{
	return request({
		url: '/openApi/student/add',
		method: 'post',
		data: params,
	})
}

// 签到
export const saveSignIn = (params) =>{
	return request({
		url: '/openApi/signUp/save',
		method: 'post',
		data: params,
	})
}

// 保存入住信息
export const applyStayApi = (params) =>{
	return request({
		url: '/openApi/lodging/apply',
		method: 'post',
		data: params,
	})
}

// 获取个人信息
export const getPersonInfo = (params) =>{
	return request({
		url: '/openApi/customer/my',
		method: 'get',
		data:params,
	})
}

// 获取stsToken
export const getStsToken = () =>{
	return request({
		url: '/aliOss/getStsToken',
		method: 'get',
	})
}

/* 
上传多张图片至oss
*/
export const ossUploadRecord = (query) =>{
  return request({
    url: `common/ossUploadRecord?${query.toString()}`,
    method: 'get',
  })
}